//
//  NSObject+ZMAddAttribute_h.m
//  demo
//
//  Created by chenzm on 2018/8/17.
//  Copyright © 2018年 chenzm. All rights reserved.
//

#import "NSObject+ZMAddAttribute_h.h"
#import <objc/message.h>

@implementation NSObject (ZMAddAttribute_h)

-(void)setName:(NSString *)name{
    objc_setAssociatedObject(self, @"name", name, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

-(NSString *)name{
    return objc_getAssociatedObject(self, @"name");
}

@end
